<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ include file="/page/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp" %>
</head>
<script type="text/javascript">

	function rowClickAfter(rowIndex,tradeId) {
		var  arrId = document.getElementsByName("check");
		arrId[rowIndex -1 ].checked=true;
	}
	
	function viewAppServer(){
		if(appType==null){
			alert("请选择一条记录！");
		}else{
			window.location.href="${ctx}/itom/appServerView?app_type="+appType;
		}
	}
</script>
<body>
<br>
			<div class="op-btn">
				<input type="button" class="btn btn-default" onclick="viewAppServer1()" value="查看"/>
				<input type="button" class="btn btn-default" onclick="publishAppServer()" value="发布应用"/>
			</div>	
<macms:table dataListName="asList" pageMode="true" >
	<macms:text id="server_id" label="应用服务器标识"></macms:text>
	<macms:text id="server_name" label="应用服务器名称"></macms:text>
	<macms:text id="server_ip" label="应用服务器IP"></macms:text>
	<macms:text id="server_port" label="应用服务器端口"></macms:text>
	<macms:text id="login_user" label="应用服务器登录用户"></macms:text>
</macms:table>
	<script language="javascript">
	    var preRow = null;
	    var appType = null;
		$('tbody tr').bind('click', function() {
	
			var rowIndex = $(this).prevAll().length+1;
			if(rowIndex <1) return;
			
			if(preRow != null){
				preRow.removeClass("active");
			}
			$(this).addClass("active");
			preRow = $(this);
			appType=$(this).find("td").eq(1).text();
			// 行单击后事件(传入行号，页面标识)
			rowClickAfter(rowIndex,
					$(this).find("td").eq(1).text());
		});
	</script>
</body>
</html>
